Imports Cor = Enhancements.Core
Imports Ref = System.Reflection
Imports Sys = System

Namespace Enhancements.Core.Logging
    ''' <summary>Represents an association between a level and an assembly.</summary>
    Public NotInheritable Class LevelMappingAssembly
        Inherits LevelMapping

        ''' <summary>Initializes a LevelMappingAssembly instance.</summary>
        ''' <param name="_assembly">Assembly to use by the instance.</param>
        ''' <param name="_level">Level to use by the instance.</param>
        ''' <param name="_overridesDescendants">OverridesDescendants to use by the instance.</param>
        ''' <exception cref="IsNullException">_assembly is null.</exception>
        Public Sub New(ByVal _assembly As Ref.Assembly, ByVal _level As Level, ByVal _overridesDescendants As Boolean)
            MyBase.New(_level, _overridesDescendants)
            Assembly = _assembly
        End Sub

        Private __Assembly As Ref.Assembly = Nothing
        ''' <summary>Gets the assembly used by the instance. The default value is null.</summary>
        ''' <exception cref="IsNullException">The value is null (while setting).</exception>
        Public Property Assembly() As Ref.Assembly
            Get
                Return __Assembly
            End Get
            Private Set(ByVal _value As Ref.Assembly)
                Cor.___Assert.___IsNullNot("Assembly._value", _value, True)

                __Assembly = _value
            End Set
        End Property

    End Class
End Namespace
